#include "cat.hpp"
#include <iostream>
#include <cstring>
using namespace std;

void Cat::catchMouse()
{
    cout << "抓老鼠" << endl;
}
void Cat::playMagic()
{
    cout << "玩魔方" << endl;
}
void Cat::setAttr(int a, char *n, float w)
{
    age = a;
    strcpy(name, n);
    weight = w;
}
void Cat::show()
{
    cout << "年龄：" << age << endl;
    cout << "名字：" << name << endl;
    cout << "体重：" << weight << endl;
}
